<template>
  <view>
    <template v-if="secondindex == 0">
      <Index @goxueba="goxuebapage"></Index>
    </template>
    <template v-if="secondindex == 1">
      <XueBaDaoJia></XueBaDaoJia>
    </template>
    <template v-if="secondindex == 2">
      <BookParent></BookParent>
    </template>
    <template v-if="secondindex == 3">
      <ParentHome></ParentHome>
    </template>
  </view>
</template>

<script>
import Index from '@/components/parents/index/index.vue';
import ParentHome from '@/components/parents/parenthome/parentHome.vue';
import XueBaDaoJia from '@/components/parents/xuebadaojia/xuebadaojia.vue';
import BookParent from '@/components/parents/book_parent/bookParent.vue';
export default {
  components: {
    Index,
    XueBaDaoJia,
    ParentHome,
    BookParent
  },
  props: {
    secondindex: Number
  },
  data() {
    return {};
  },
  methods: {
    // 父组件接受子组件的值
    goxuebapage(value) {
      this.$emit('goxuebapage', value);
    }
  }
};
</script>

<style></style>